<template>
  <h3>ruleCode 组件示例</h3>

  <f-switch v-model:checked="disabled" />
  <f-rule-code
    v-model:value="inputValue"
    :disabled="disabled"
    code="BEHINDMETHOD"
    orgId="-1"
    class="w200"
    @change="handleChange"
  />
  {{ inputValue }}

  <f-form-layout
    class="mb20"
    ref="form"
    layout="horizontal"
    :columns="columns"
  ></f-form-layout>
</template>

<script setup>
import { ref } from 'vue';

const disabled = ref(false);
const inputValue = ref('');

const handleChange = e => console.log('handleChange', e);

const columns = [
  {
    label: '出库单号',
    field: 'inoutBoundNo',
    type: 'rule-code',
    props: { code: 'bloodRefundBoundNo', orgId: '-1', disabled: true },
    required: true,
    span: 8
  }
];

</script>

<style lang="scss">

</style>
